package com.scuec.tourismwebsite.controller;

import com.scuec.tourismwebsite.entity.ProductDataAnalysis;
import com.scuec.tourismwebsite.service.ProductDataAnalysisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("tour/v1")
public class ProductDataAnalysisController {
    @Autowired
    private ProductDataAnalysisService productDataAnalysisService;

    @GetMapping("prodata")
    public List<ProductDataAnalysis> getProductDataAnalysis(){
        return productDataAnalysisService.findProductDataAnalysisAll();
    }
}
//1